package domd10;
class Mydai<E extends Comparable<E>>{
    public Object[] obj=new Object[10];
    public E compara(E[] array){
               E max=array[0];
        for (int i = 1; i < array.length; i++) {
            if(max.compareTo(array[i])<0){
                max=array[i];
            }
        }
        return max;
    }
}
public class Test {
    public static void main(String[] args) {
        Integer[] arrays={1,56,23,5,10,81};
        Mydai<Integer> mydai=new Mydai<>();
        System.out.println(mydai.compara(arrays));
    }
}
